import axios from 'axios'

import type { IDictionaryListItem } from '..'
import './__mock__'

/** 获取字典配置列表 */
export const apiGetDynamicFieldList = async (
  types: ('dynamic_field' | 'address' | 'date')[],
): Promise<IDictionaryListItem[]> => {
  return axios.post(`/tmsapi/dictionary/list`, { types }).then(res => res.$data || [])
}
